﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace S.Archives.Api.Migrations
{
    public partial class str_创建流转表 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<DateTime>(
                name: "ReproductiveStateDate",
                table: "SheepFileModel",
                type: "datetime2",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "WanderReproductiveState",
                table: "SheepFileModel",
                type: "int",
                nullable: true);

            migrationBuilder.CreateTable(
                name: "WanderModel",
                columns: table => new
                {
                    WanderId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    EITag = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    WanderReproductiveState = table.Column<int>(type: "int", nullable: true),
                    Content = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    WanderDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    SerialNumber = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_WanderModel", x => x.WanderId);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "WanderModel");

            migrationBuilder.DropColumn(
                name: "ReproductiveStateDate",
                table: "SheepFileModel");

            migrationBuilder.DropColumn(
                name: "WanderReproductiveState",
                table: "SheepFileModel");
        }
    }
}
